const router = require('koa-router')()
const { find, 
  findById,
  addUser,
  updateById,
  deleteById
} = require('../controllers/user')

router.prefix('/api/user')

router.get('/', find)
router.get('/:id', findById)
router.post('/', addUser)
router.put('/:id', updateById)
router.delete('/:id', deleteById)

module.exports = router;
